import request from '@/utils/request'

//添加商铺
export function add(data) {
  return request({
    url: 'api/shStore/add',
    method: 'post',
    data
  })
}
export function getInfo(id) {
  return request({
    url: 'api/shStore/info/' + id,
    method: 'get'
  })
}

export function getArea(params) {
  return request({
    url: 'api/areaTree/getCityByCode',
    method: 'get',
    params
  })
}

export function getStoreCategoryList(params) {
  return request({
    url: 'api/getStoreCategoryList ',
    method: 'get',
    params
  })
}
export function userList(params) {
  return request({
    url: 'api/yxUser/list',
    method: 'get',
    params
  })
}

export function audit(data) {
  return request({
    url: 'api/shStore/audit',
    method: 'post',
    data
  })
}

export function onOrOff(data) {
  return request({
    url: 'api/shStore/onOrOff',
    method: 'post',
    data
  })
}

//编辑
export function update(data) {
  return request({
    url: 'api/shStore/update',
    method: 'post',
    data
  })
}
